#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
开发环境配置
"""
from typing import Optional

from pydantic import BaseSettings


class Settings(BaseSettings):
    # 开发模式配置
    DEBUG: bool = True
    # 项目文档
    TITLE: str = "标题"
    DESCRIPTION: str = "描述"
    # 文档地址 默认为docs
    DOCS_URL: str = "/api/docs"
    # 文档关联请求数据接口
    OPENAPI_URL: str = "/api/openapi.json"

    REDOC_URL: Optional[str] = "/api/redoc"

    # token过期时间 分钟
    ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24
    # 生成token的加密算法
    ALGORITHM: str = "HS256"

    # 生产环境保管好 SECRET_KEY
    SECRET_KEY: str = "aeq)s(*&(&)()WEQasd8**&^9asda_asdasd*&*&^+_sda"

    WORKERS = 1

    PROJECT_NAME = "bid_item"


settings = Settings()
